Properties

$browser

$browser

$app

$app

$config

$config

$charset

$charset

$env

$env

$skins

$skins

Methods

__construct()

__construct() : mixed

Object constructor

Returns

mixed —

__get()

__get(mixed  $var) : mixed

Magic getter

Parameters

mixed $var

Returns

mixed —

set_charset()

set_charset(string  $charset) : mixed

Setter for output charset.

To be specified in a meta tag and sent as http-header

Parameters

string $charset

Charset name

Returns

mixed —

get_charset()

get_charset() : string

Getter for output charset

Returns

string —

Output charset name

set_env()

set_env(string  $name, mixed  $value) : mixed

Set environment variable

Parameters

string $name

Property name

mixed $value

Property value

Returns

mixed —

get_env()

get_env(string  $name) : mixed

Environment variable getter.

Parameters

string $name

Property name

Returns

mixed —

Property value

reset()

reset() : mixed

Delete all stored env variables and commands

Returns

mixed —

show_message()

show_message(string  $message, string  $type = 'notice', array  $vars = null, bool  $override = true, int  $timeout) : mixed

Invoke display_message command

Parameters

string $message

Message to display

string $type

Message type [notice|confirm|error]

array $vars

Key-value pairs to be replaced in localized text

bool $override

Override last set message

int $timeout

Message displaying time in seconds

Returns

mixed —

redirect()

redirect(array|string  $p = [], int  $delay = 1) : mixed

Redirect to a certain url.

Parameters

array|string $p

Either a string with the action or url parameters as key-value pairs

int $delay

Delay in seconds

Returns

mixed —

send()

send() : mixed

Send output to the client.

Returns

mixed —

nocacheing_headers()

nocacheing_headers() : mixed

Send HTTP headers to prevent caching a page

Returns

mixed —

future_expire_header()

future_expire_header(mixed  $offset = 2600000) : mixed

Send header with expire date 30 days in future

Parameters

mixed $offset

Returns

mixed —

common_headers()

common_headers(bool  $privacy = true) : mixed

Send browser compatibility/security/privacy headers

Parameters

bool $privacy

Enable privacy headers

Returns

mixed —

download_headers()

download_headers(string  $filename, array  $params = []) : mixed

Send headers related to file downloads

Parameters

string $filename

File name

array $params

Optional parameters: type - File content type (default: 'application/octet-stream') disposition - Download type: 'inline' or 'attachment' (default) length - Content length charset - File name character set type_charset - Content character set time_limit - Script execution limit (default: 3600)

Returns

mixed —

raise_error()

raise_error(int  $code, string  $message) : mixed

Show error page and terminate script execution

Parameters

int $code

Error code

string $message

Error message

Returns

mixed —

get_edit_field()

get_edit_field(string  $name, string  $value, array  $attrib = [], string  $type = 'text') : string

Create an edit field for inclusion on a form

Parameters

string $name

Field name

string $value

Field value

array $attrib

HTML element attributes for the field

string $type

HTML element type (default 'text')

Returns

string —

HTML field definition

json_serialize()

json_serialize(mixed  $input, bool  $pretty = false, bool  $inline = true) : string

Convert a variable into a javascript object notation

Parameters

mixed $input

Input value

bool $pretty

Enable JSON formatting

bool $inline

Enable inline mode (generates output safe for use inside HTML)

Returns

string —

Serialized JSON string